<?php
$sites =array();
$i=0;
foreach ($places as $place) {
	$sites[$i++]=array( 'id'		=>$place->id,
						'title'		=>$place->nombre,
						'latitud'	=>$place->coor_lat,
						'longitud'	=>$place->coor_long
					  );
}					 
$result=array('places'=>$sites);					  
echo json_encode($result);						  

?>